<?php
class Log{
	public static function add_log($action,$server=""){
		$username = mysql_escape_string($_SESSION['user']->login);
		$action = mysql_escape_string($action); 
		$sql_query=mysql_query("INSERT INTO ".DATABASE_TABLE_LOG."(date,action,user,server,ip) VALUES('".time()."', '".$action."','".$username."','".$server."','".$_SERVER['REMOTE_ADDR']."')") ;
	}
	
	public static function debug($string){
		$filedebug = fopen("debug.log",'a+');
		fwrite($filedebug,$string."\n");
		fclose($filedebug);
	}
}
?>